<template>
    <div class="head">
        <div class="banner">
            <div class="pic">
                <img :src="this.data.bannerImg" alt="" @click="show=1">
                <p>{{this.data.sightName}}</p>
                <router-link to="/">
                    <div class="button"><span class="iconfont icon-zuojiantou"></span></div>
                </router-link>
                <p class="img"><span class="iconfont icon-tupian"></span>2</p>
            </div>
        </div>
        <div class="model" v-show="show==1" @click="show=0">
            <swiper :options="swiperOption">
                <swiper-slide v-for="(v,i) in this.data.gallaryImgs" :key="i">
                    <img :src="v" alt="">
                </swiper-slide>
                <div class="swiper-pagination fenye" slot="pagination" ></div>
            </swiper>
        </div>
    </div> 
</template>

<script>
export default {
    props:['data'],
    data:function(){
        return {
            show:0,
            swiperOption:{
                pagination:{
                    el: '.swiper-pagination',
                    type: 'fraction',
                }
            }
        }
    },
}
</script>

<style lang="less" scoped>
@import"../../assets/iconfont/iconfont.css";
    *{
        margin: 0;
        padding: 0;
    }
    .banner{
            position: relative;
            position: absolute;
        img{
            width: 100%;
            border: 0;
        }
        p{
            position: absolute;
            color: white;
            font-size: .4rem;
            padding: 0 .2rem;
            bottom: 0.1rem;
            left: 0;
        }
        .button{
            position: absolute;
            width: 1rem;
            height: 1rem;
            border-radius: 50%;
            background-color: black;
            opacity: 0.8;
            left: 0.22rem;
            top: 0.22rem;
            text-align: center;
            line-height: 1rem;
            .iconfont{
                color: white;
                font-size: 0.7rem;
            }
        }
        p.img{
            position: absolute;
            width: 1.3rem;
            left: 100%;
            transform: translateX(-100%);
            background-color: black;
            bottom: 0.1rem;
            color: white;
            text-align: center;
            font-size: 0.3rem;
            padding: 0.05rem;
            border-radius: 3px;
            line-height: auto;
            span{
                font-size: 0.2rem;
                margin-right: 0.1rem;
            }
        }
    }
    .pic{
        position: relative;
    }
    .model{
            position: absolute;
            z-index: 9999;
            height: 13.52rem;
            width: 7.62rem;
            overflow: auto;
            background-color: black;
            line-height: 13.52rem;
            img{
                width: 100%;
                
            }
        }
        .fenye{
            bottom: -205px;
            color: white;
            left: 50%;
            transform: translateX(-50%);
            font-size: 0.4rem;
        }
</style>
